# -*- coding: utf-8 -*-

###################################################
# pandas 操作  数据分析
#  pip install pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
#  pip install xlrd==1.2.0
#  pip install openpyxl
###################################################

import pandas as pd
from pprint import pprint


class PandasTest():
    def __init__(self):
        pass

    # 数据读取常用方法
    # read_csv() : txt 、csv文件
    # read_excel(): excel
    def read(self, file):
        excel = pd.read_excel(file, engine='openpyxl')
        pprint(excel.head(10))  # 读取5条


if __name__ == '__main__':
    p = PandasTest();
    p.read('D:\\doc\\ecs概览(1).xlsx')
